home *** CD-ROM | disk | FTP | other *** search
/ BMUG PD-ROM 1995 Fall / PD-ROM F95.toast / Telecom / Internet / Internet A-M / HTML+ 1.0b1 ƒ / clip2gif 0.4 for HTML+ / drawings.script < prev    next >
Encoding:
Text File  |  1995-02-28  |  1.0 KB  |  27 lines  |  [TEXT/ToyS]

  1. tell application "clip2gif"
  2.     --some text
  3.     set theDrawing to {{drawn text:"clip2gif 0.4", size:100, font:"Times", position:{20, 370}}}
  4.     
  5.     --and a colorful chart
  6.     set theDrawing to theDrawing & {{line:{10, 270, 490, 270}, thickness:3}}
  7.     repeat with x from 20 to 460 by 20
  8.         set h to random number from 20 to 250
  9.         set rgb to {random number from 0 to 80, ¬
  10.             random number from 0 to 80, ¬
  11.             random number from 0 to 80}
  12.         set theDrawing to theDrawing & {{RGB color:rgb, rectangle:{x, 270 - h, x + 18, 270}}}
  13.     end repeat
  14.     set h0 to random number from 20 to 250
  15.     repeat with x from 40 to 460 by 20
  16.         set h to random number from 20 to 250
  17.         set theDrawing to theDrawing ¬
  18.             & {{RGB color:{0, 0, 100}, line:{x - 10, 270 - h0, x + 10, 270 - h}, thickness:2}}
  19.         set h0 to h
  20.     end repeat
  21.     
  22.     --creates the graphic from scratch by specifying the size of the image instead of a PICT file
  23.     convert {500, 400} saving as GIF ¬
  24.         in (new file default name "clip2gif04-test.gif") ¬
  25.         depth 8 drawing theDrawing with interlacing and transparency
  26. end tell
  27.